import axios from '@/axios'
enum API {
    ROLE_ROUTE_GETALL = '/getRole_RouteAll',
    ROLE_ROUTE_GETPAGE = '/getRole_RoutePage',
    ROLE_ROUTE_GETKEYPAGE = '/SearchRole_RouteKey',
    ROLE_ROUTE_UPDATEBYID = '/updataRole_RouteById',
    ROLE_ROUTE_DELETEBYID = '/deleteRole_RouteById',
    ROLE_ROUTE_DELETEMOREBYID = '/deleteRole_RouteMoreById',
    ROLE_ROUTE_ADD = '/addRole_Route',
    ROLE_ROUTE_TIPLIST = '/optionsList',
    
}
// 获取所有路由信息
export const getRole_RouteAllAPI = () => axios.get(API.ROLE_ROUTE_GETALL)
// 分页查询路由
export const getRole_RoutePageAPI = (data: any) => axios.post(API.ROLE_ROUTE_GETPAGE, data)
// 指定key-value分页查询路由
export const getRole_RouteKeyPageAPI = (data: any) => axios.post(API.ROLE_ROUTE_GETKEYPAGE, data)
// 根据id更新路由
export const UpdateRole_RouteByIdAPI = (data: any) => axios.post(API.ROLE_ROUTE_UPDATEBYID, data)
// 根据id删除路由
export const DeleteRole_RouteByIdAPI = (id: string) => axios.delete(`${API.ROLE_ROUTE_DELETEBYID}/${id}`)
// 根据id批量路由
export const DeleteRole_RouteMoreByIdAPI = (ids: any) => axios.post(API.ROLE_ROUTE_DELETEMOREBYID, ids)
// 添加路由
export const AddRole_RouteAPI = (data: any) => axios.post(API.ROLE_ROUTE_ADD, data)
// 获取所有可选项
export const getTipAPI = () => axios.get(API.ROLE_ROUTE_TIPLIST)